﻿@using Kit.Common

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layui_A.cshtml";

}
<div class="site-text site-block" style="width: 80%; margin: 0 auto;">

    <span></span>
    @using (Html.BeginForm("addproductaction", "Products", FormMethod.Post, new { @class = "layui-form" }))
    {
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
            <legend>产品综合管理</legend>
        </fieldset>
        <div class="layui-form-item" style="padding-left: 70%">
            <div class="layui-input-inline">
                <input type="text" name="password" required="" id="searchval" placeholder="请输入编号或者产品名称" autocomplete="on" class="layui-input">
            </div>
            <div class="">
                <input type="button" name="serach" id="btn_serach" class="layui-btn" value="搜索">
            </div>
        </div>

        @Html.Raw(ViewBag.prolisthtml)

    }
</div>
<script type="text/javascript">
    $("#btn_serach").bind("click",
        function () {
            window.location.href = "../../Products/index/?Pnumber=" + $("#searchval").val();
        });
    var btn = {
        AddlableRoleLog: function (pid, lid) {
            var strurl = "../../LabelRoleLog?id=" + pid + "&lid=" + lid;
            layer.open({
                title: "添加管理标签记录",
                type: 2,
                anim: 2,
                scrollbar: false,
                shade: 0.5,
                content: strurl, //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
                Boolean: true,
                resize: true,
                area: ["80%", "80%"],
                maxmin: true,
                cancel: function (index, layero) {
                    layer.confirm("确定要关闭么?如果暂时不用可以最小化当前页面哦！", function () {
                        layer.close(index);
                        layer.closeAll('dialog'); //关闭信息框

                    }, function () {
                        layer.msg("取消");
                    },
                        { icon: 6 });
                    //if (confirm('')) { //只有当点击confirm框的确定时，该层才会关闭
                    //    layer.close(index)
                    //}
                    return false;
                }
            });
        }
    }

    $(function () {
        $(".layui-table tr th:last-child,.layui-table tr td:last-child").text("");
        layer.msg("点击产品列表中【查看标签记录】查看标签打印记录", {
            time: 0,btn: ['Close'], yes: function (index)
            { layer.close(index) }
        });
    });
</script>